package com.xd.common.util;

import com.xd.common.exception.XkdException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * AES加密工具类
 *
 * @author ACGkaka
 * @since 2021-06-18 19:11:03
 */
public class LogUtil {
    /**
     * 日志相关
     */
    private static final Logger LOGGER = LoggerFactory.getLogger(LogUtil.class);

    public static void info(String msg, Exception e) {
        if (e instanceof XkdException) {
            if (!e.getMessage().contains(" 未找到") && !e.getMessage().contains("被其他") && !e.getMessage().contains("匹配超时"))
                LOGGER.info(msg + " {}", e.getMessage());
        } else
            LOGGER.info(msg, e);
    }
}
